package com.xiaoyi.condition;

import java.util.Map;
import java.util.Objects;

/**
 * @author xiaoyi
 * @version 1.0.0
 * @createTime 2023-02-20 22:17:00
 */
public abstract class AbstractCondition implements Condition{


    @Override
    public ConditionModel condition(Map<String, Object> map) {
        if (Objects.isNull(map)){
            ConditionModel conditionModel = new ConditionModel();
            conditionModel.setSql("");
            return conditionModel;
        }
        return doCondition(map);
    }
    public abstract  ConditionModel doCondition(Map<String,Object> map);

}
